package com.project.bean;

import java.time.LocalDate;

/*学生对象*/
public class StudentBean {
    /**
     * 学生id
     */
    private int id;
    /**
     * 学生姓名
     */
    private String name;
    /**
     * 学生性别
     */
    private String gender;
    /**
     * 学生电话
     */
    private String phone;
    /**
     * 入住时间
     */
    private LocalDate time = LocalDate.now();
    /**
     * 头像路径
     */
    private String imSrc;
    /**
     * 所属班级
     */
    private ClassBean classBean;
    /**
     * 所属房间
     */
    private RoomBean roomBean;

    public StudentBean() {
    }

    public StudentBean(String name, String gender, String phone, String imSrc, Integer classId, Integer roomId) {
        this.name = name;
        this.gender = gender;
        this.phone = phone;
        this.imSrc = imSrc;
        this.classBean = new ClassBean();
        this.classBean.setId(classId);
        this.roomBean = new RoomBean();
        this.roomBean.setId(roomId);
    }

    @Override
    public String toString() {
        return "StudentBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", phone='" + phone + '\'' +
                ", time=" + time +
                ", imSrc='" + imSrc + '\'' +
                ", classBean=" + classBean +
                ", roomBean=" + roomBean +
                "\n";
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public LocalDate getTime() {
        return time;
    }

    public void setTime(LocalDate time) {
        this.time = time;
    }

    public String getImSrc() {
        return imSrc;
    }

    public void setImSrc(String imSrc) {
        this.imSrc = imSrc;
    }

    public ClassBean getClassBean() {
        return classBean;
    }

    public void setClassBean(ClassBean classBean) {
        this.classBean = classBean;
    }

    public RoomBean getRoomBean() {
        return roomBean;
    }

    public void setRoomBean(RoomBean roomBean) {
        this.roomBean = roomBean;
    }
}
